<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta name="format-detection" content="telephone=no"/>
<title>门店列表</title>
<link rel="stylesheet" type="text/css" href="../addons/weisrc_dish/template/css/1/wei_canyin_v1.8.4.css?v=1.0" media="all">
<link rel="stylesheet" type="text/css" href="../addons/weisrc_dish/template/css/1/wei_dialog_v1.2.1.css?v=1.0" media="all">
<script type="text/javascript" src="../addons/weisrc_dish/template/js/1/wei_webapp_v2_common_v1.9.4.js"></script>
<script type="text/javascript" src="../addons/weisrc_dish/template/js/1/wei_industry_common_v1.3.0.js?v=1"></script>
<script type="text/javascript" src="../addons/weisrc_dish/template/js/1/wei_dialog_v1.9.9.js"></script>
<script type="text/javascript" src="../addons/weisrc_dish/template/js/2/jQuery.js"></script>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=5PESLgvMcSbSUbPjmDKgvGZ3"></script>
<script type="text/javascript" src="../addons/weisrc_dish/template/js/postion.js"></script>
<style>
    .headselect {
        float: none;
        width: 100%;
        display: block;
        font-size: 14px;
        height: 40px;
        margin: 0px;
        padding: 0px;
        margin-bottom: 10px;
    }

    ul, li {
        list-style: none;
        margin: 0;
        padding: 0
    }

    .top_bar {
        position: fixed;
        z-index: 9;
        bottom: 0;
        left: 0;
        right: 0;
        margin: auto;
        font-family: Helvetica, Tahoma, Arial, Microsoft YaHei, sans-serif;
    }

    .top_menu {
        display: -webkit-box;
        border-top: 1px solid #3D3D46;
        display: block;
        width: 100%;
        background: rgba(255, 255, 255, 0.7);
        height: 48px;
        display: -webkit-box;
        display: box;
        margin: 0;
        padding: 0;
        -webkit-box-orient: horizontal;
        background: -webkit-gradient(linear, 0 0, 0 100%, from(#524945), to(#48403c), color-stop(60%, #524945));
        box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.1) inset;
    }

    .top_bar .top_menu>li {
        -webkit-box-flex: 1;
        position: relative;
        text-align: center;
    }

    .top_menu li:first-child {
        background: none;
    }

    .top_bar .top_menu>li>a {
        height: 48px;
        margin-right: 1px;
        display: block;
        text-align: center;
        color: #FFF;
        text-decoration: none;
        text-shadow: 0 1px rgba(0, 0, 0, 0.3);
        -webkit-box-flex: 1;
    }

    .top_bar .top_menu>li.home {
        max-width: 70px
    }

    .top_bar .top_menu>li.home a {
        height: 66px;
        width: 66px;
        margin: auto;
        border-radius: 60px;
        position: relative;
        top: -22px;
        left: 2px;
        background: url('tpl/Wap/default/common/images/home.png') no-repeat center center;
        background-size: 100% 100%;
    }

    .top_bar .top_menu>li>a label {
        overflow: hidden;
        margin: 0 0 0 0;
        font-size: 12px;
        display: block !important;
        line-height: 18px;
        text-align: center;
    }

    .top_bar .top_menu>li>a img {
        padding: 3px 0 0 0;
        height: 24px;
        width: 24px;
        color: #fff;
        line-height: 48px;
        vertical-align: middle;
    }

    .top_bar li:first-child a {
        display: block;
    }

    .top_menu li:last-of-type a {
        background: none;
        overflow: hidden;
    }

    .icons_5 {
        display: block;
        width: 55px;
        height: 55px;
        position: absolute;
        top: -15px;
        right: 10px;
        border-radius: 45px;
        background: url("../addons/weisrc_dish/template/images/btn2.png") no-repeat center center;
        -webkit-background-size: 100% 100%;
        z-index: 105;
    }

    .icons_5 label {
        display: inline-block;
        width: 15px;
        height: 15px;
        border-radius: 15px;
        border: 1px solid #ffffff;
        background: red;
        line-height: 15px;
        text-align: center;
        color: #fff;
        position: absolute;
        right: 0px;
        top: 0px;
    }

    .headtext {
        -webkit-background-clip: border-box;
        -webkit-background-origin: padding-box;
        -webkit-background-size: auto;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        background-attachment: scroll;
        background-clip: border-box;
        background-color: #5ac5d4;
        background-image: none;
        background-origin: padding-box;
        background-size: auto;
        color: rgb(255, 255, 255);
        cursor: pointer;
        display: block;
        font-size: 18px;
        font-style: normal;
        height: 40px;
        line-height: 40px;
        margin: 0px;
        overflow-x: hidden;
        overflow-y: hidden;
        padding: 0px;
        position: relative;
        text-align: center;
        text-decoration: none;
    }

    .headtext2 {
        -webkit-background-clip: border-box;
        -webkit-background-origin: padding-box;
        -webkit-background-size: auto;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        background-attachment: scroll;
        background-clip: border-box;
        background-color: #5ac5d4;
        background-image: none;
        background-origin: padding-box;
        background-size: auto;
        color: rgb(255, 255, 255);
        cursor: pointer;
        display: block;
        font-size: 18px;
        font-style: normal;
        height: 40px;
        line-height: 40px;
        margin: 0px;
        overflow-x: hidden;
        overflow-y: hidden;
        padding: 0px;
        position: relative;
        text-align: left;
        text-decoration: none;
        padding-left: 10px;
    }

    .btn_order1 {
        float:left; border-radius: 8px; width: 30px; height: 40px;text-align: center;
    }
    .btn_order2 {
        float:left;  border-radius: 8px; width: 30px; height: 40px;text-align: center;
    }
</style>
</head>
<body style="background-color:#e9e9eb;">
<!--<div class="footFix topSearch" data-indent="140" data-ffix-top="0" id="topSearch">-->
<!--<form method="get" action="{php echo $this->createMobileUrl('waprestlist', array('from_user' => $from_user))}">-->
<!--<div class="box">-->
<!--<p><input type="text" placeholder="搜索店名、地址..." name="keyword" value=""/></p>-->
<!--<span>-->
<!--<input type="button" value="搜索" onClick="if(_trim(document.getElementsByName('keyword')[0].value)){return this.form.submit();}else{return false}"/>-->
<!--<input type="reset" value="取消" onClick="document.getElementsByName('keyword')[0].value='';return false;"/>-->
<!--<input type="hidden" name="latitude" value=""/>-->
<!--</span>-->
<!--</div>-->
<!--</form>-->
<!--</div>-->
<div class="headselect">
    <div class="{if empty($area)}headtext{else}headtext2{/if}">
        {if empty($area)}
        <a class="link_tel icon-phone ">请选择订餐门店</a>
        {else}
        <select id="area" name="area" style="height: 28px;" onchange="select_area(this);">
            <option value="-1">请选择</option>
            <option value="0" selected>全部区域</option>
            {loop $area $item}
            <option value="{$item['id']}" {if $item['id']==$areaid}selected{/if}>{$item['name']}</option>
            {/loop}
        </select>
        {/if}
        <p><input type="text" placeholder="搜索店名、地址..." name="keyword" value=""/></p>
        <span>
            <input type="button" value="搜索" onClick="if(_trim(document.getElementsByName('keyword')[0].value)){return this.form.submit();}else{return false}"/>
            <input type="reset" value="取消" onClick="document.getElementsByName('keyword')[0].value='';return false;"/>
            <input type="hidden" name="latitude" value=""/>
        </span>
    </div>
</div>
<div id="page_order" style="padding-top: 0px;margin-top: 10px;" >
    <input type="hidden" id="curlat" name="curlat" value="0" />
    <input type="hidden" id="curlng" name="curlng" value="0" />
    {loop $restlist $row}
    <section class="morelist" style="height: 130px;">
        <input id="showlan" type="hidden" value="{$row['lng']},{$row['lat']}"/>
        <article>
            <a href="{php echo $this->createMobileUrl('waplist', array('storeid' => $row['id'], 'from_user' => $from_user), true)}">
                <table style="cursor:pointer;width: 100%;">
                    <tbody>
                    <tr>
                        <td rowspan="3">
                            <span>
                                <img src="{if strstr($row['logo'], 'http') || strstr($row['logo'], './source/modules/')}{$row['logo']}{else}{$_W['attachurl']}{$row['logo']}{/if}" >
                            </span>
                        </td>
                        <td>
                            <h1 style="float:left;">{$row['title']}</h1>
                            {if $row['is_delivery']==1 && !empty($row['sendingprice'])}
                            <div style="margin-left:5px;float:right;display: block">
                                <p style="line-height:20px;color: white;background-color: #88c5ce;" class="btn_order2">{$row['sendingprice']}元起送</p>
                            </div>
                            {/if}
                            {if $row['is_meal']==1}
                            <div style="margin-left:5px;float:right;display: block">
                                <p style="line-height:20px;color: white;background-color: #ff6a00;" class="btn_order2">在线订餐</p>
                            </div>
                            {/if}
                            {if $row['is_delivery']==1}
                            <div style="margin-left:5px;float:right;display: block">
                                <p style="line-height:20px;color: white;background-color:#F54343;" class="btn_order1">外卖订餐</p>
                            </div>
                            {/if}
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <p>{$row['address']}<br/><font id="shopspostion">计算中...</font></p>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <!--{if $row['is_delivery']==1}-->
                            <!--<div style="float:left;display: block;min-height: 25px;">-->
                                <!--&lt;!&ndash;<p style="float:left;background-color: #88c5ce;width: 25px;text-align: center; line-height: 25px; color: white;border-radius: 30px;">外</p>&ndash;&gt;-->
                                <!--{if !empty($row['sendingprice'])}-->
                                <!--<p style="margin-left:0px;float:left;background-color: #88c5ce;width: 62px; height: 25px; text-align: center; line-height: 25px; color: white;border-radius: 5px;">{$row['sendingprice']}元起送</p>-->
                                <!--{/if}-->
                            <!--</div>-->
                            <!--{/if}-->
                        </td>
                    </tr>
                    </tbody>
                </table>
            </a>
        </article>
        <ul>
            {if !empty($row['tel'])}
            <li><a href="javascript:void(0);" class="order" onclick="select_phone({$row['tel']});">预订</a></li>
            {/if}
            <li>
                <a href="http://api.map.baidu.com/marker?location={$row['lat']},{$row['lng']}&title={$row['title']}&name={{$row['title']}}&content={$row['address']}&output=html&src=weiba|weisrc" class="gps">导航</a></li>
            <li>
                <a href="{php echo $this->createMobileUrl('wapshopshow', array('storeid' => $row['id'], 'from_user' => $from_user), true)}" class="reality">实景</a></li>
        </ul>
    </section>
    {/loop}
</div>
<script type="text/javascript">
    function select_area(obj) {
        if (obj.value != -1) {
            window.location.href = "{php echo $this->createMobileurl('waprestlist', array('storeid' => $storeid), true)}" + '&areaid=' + obj.value;
        }
    }

    function select_phone(obj) {
        window.location.href = "tel:" + obj;
    }
</script>
</body>
</html>